//
//  IWeighMyselfAppDelegate.h
//  IWeighMyself
//
//  Created by Francisco Gindre on 7/28/10.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface IWeighMyselfAppDelegate : NSObject <UIApplicationDelegate> {
    
    UIWindow *window;
    UINavigationController *navigationController;
	//NSMutableDictionary rep of the UserData.plist
	NSMutableDictionary *plistXML;
	//file path of the user data plist
	NSString * plistPath;
	// file name of the plistFile (change it in appDelegate constructor)
	NSString * plistFileName;
	
    // filename of the plistFile with the plist extension
	NSString *plistFileNameWithExtension;
	
	NSDateFormatter *dateFormatter;
	
	//name of the weight database
	NSString *databaseName;
    
	//path of the database
	NSString *databasePath;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@property (nonatomic, retain) NSMutableDictionary *plistXML;
@property (nonatomic, retain) NSString *plistPath;
@property (nonatomic, retain) NSString *plistFileName;
@property (nonatomic, retain) NSString *plistFileNameWithExtension;
@property (nonatomic, retain) NSDateFormatter *dateFormatter;
@property (nonatomic,retain) NSString *databaseName;
@property (nonatomic,retain) NSString *databasePath;



/*
 determines if the application was set up for the first time or not
 based on the size of the dictionary that contains the configuration
 parameters
 */
-(BOOL) isFirstTimeSetup;

/*
 if there is a user data property list for this application, it 
 loads it into  NSMutableDictionary *plistXML
 */
-(void)loadUserDataFromPlist;

/*
 determines whether this is the first time the application is ran
 based on the existance of a user data property list
 */
-(BOOL)isUserDataFilePresent;

/* 
 checks if kilos is the default weight unit
 */

-(BOOL)isKilosWeightSelectedUnit ;

-(void) checkAndCreateDatabase;

@end

